<?php

class FV_FormatEmail extends FormulaireValidatorImpl{
	
	public function __construct(){
		
		$this->messageEchec =  'La chaine ne correspond pas à un format email valide.';
	}
	
	public function test($value){
		$strongness = 0;
		
		$SyntaxeEmail='#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#'; 

		if(preg_match($SyntaxeEmail,$value)){
			$strongness = 1;
		}
		
		return $strongness;
	}
	
}